package com.york.dao;

import com.york.service.UserService;

public class TestDtdl {

        public static void main(String[] args) {
//真实对象
            ProxyServiceImpl userService = new ProxyServiceImpl();
//代理对象的调用处理程序
            ProxyInvocationHandler2 pih = new ProxyInvocationHandler2();
            pih.setTarget(userService); //设置要代理的对象
            ProxyService proxy = (ProxyService)pih.getProxy(); //动态生成代理类！
            proxy.delete();
        }


}
